
import { Sequelize } from "sequelize";

export const sequelize =new Sequelize({
    dialect:"sqlite",
    storage:"./db.db"
})

export const sync = async ()=>{
    let{Blog} = await import ("../model/Blogs.js")
    await sequelize.sync ({force:true})
    let arr =[
        {
            title:"红红火火",
            author:"123"
        },
        {
            title:"红红火火",
            author:"123"
        },
        {
            title:"红红火火",
            author:"123"
        },
        {
            title:"红红火火",
            author:"123"
        }
    ]
    Blog.bulkCreate(arr)
}